{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "intended-gothic",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><pre style=\"&#102;&#111;&#110;&#116;&#45;&#102;&#97;&#109;&#105;&#108;&#121;&#58;&#32;&#34;&#67;&#111;&#117;&#114;&#105;&#101;&#114;&#32;&#78;&#101;&#119;&#34;&#44;&#67;&#111;&#117;&#114;&#105;&#101;&#114;&#44;&#109;&#111;&#110;&#111;&#115;&#112;&#97;&#99;&#101;&#59;\">&#123;&#123;&#49;&#44;&#32;&#50;&#44;&#32;&#51;&#125;&#44;&#32;&#123;&#50;&#44;&#32;&#51;&#44;&#32;&#52;&#125;&#44;&#32;&#123;&#51;&#44;&#32;&#52;&#44;&#32;&#53;&#125;&#125;</pre></div>"
      ],
      "text/plain": [
       "{{1, 2, 3}, {2, 3, 4}, {3, 4, 5}}"
      ]
     },
     "execution_count": 11,
     "metadata": {
      "text/html": [],
      "text/plain": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "B={{1,2,3},{2,3,4},{3,4,5}}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "spare-albuquerque",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><img alt=\"Output\" src=\"\"></div>"
      ],
      "text/plain": [
       "1   2   3\n",
       "\n",
       "2   3   4\n",
       "\n",
       "3   4   5"
      ]
     },
     "execution_count": 2,
     "metadata": {
      "text/html": [],
      "text/plain": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "MatrixForm[A]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "judicial-indianapolis",
   "metadata": {},
   "outputs": [
    {
     "ename": "Inverse::sing",
     "evalue": "Matrix {{1, 2, 3}, {2, 3, 4}, {3, 4, 5}} is singular.",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31mInverse::sing: Matrix {{1, 2, 3}, {2, 3, 4}, {3, 4, 5}} is singular.\u001b[0m"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div><img alt=\"Output\" src=\"\"></div>"
      ],
      "text/plain": [
       "Inverse[{{1, 2, 3}, {2, 3, 4}, {3, 4, 5}}]"
      ]
     },
     "execution_count": 3,
     "metadata": {
      "text/html": [],
      "text/plain": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Inverse[A]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "mounted-straight",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><pre style=\"&#102;&#111;&#110;&#116;&#45;&#102;&#97;&#109;&#105;&#108;&#121;&#58;&#32;&#34;&#67;&#111;&#117;&#114;&#105;&#101;&#114;&#32;&#78;&#101;&#119;&#34;&#44;&#67;&#111;&#117;&#114;&#105;&#101;&#114;&#44;&#109;&#111;&#110;&#111;&#115;&#112;&#97;&#99;&#101;&#59;\">&#123;&#123;&#49;&#44;&#32;&#52;&#44;&#32;&#57;&#125;&#44;&#32;&#123;&#52;&#44;&#32;&#57;&#44;&#32;&#49;&#54;&#125;&#44;&#32;&#123;&#57;&#44;&#32;&#49;&#54;&#44;&#32;&#50;&#53;&#125;&#125;</pre></div>"
      ],
      "text/plain": [
       "{{1, 4, 9}, {4, 9, 16}, {9, 16, 25}}"
      ]
     },
     "execution_count": 4,
     "metadata": {
      "text/html": [],
      "text/plain": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A^2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "regulation-control",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><pre style=\"&#102;&#111;&#110;&#116;&#45;&#102;&#97;&#109;&#105;&#108;&#121;&#58;&#32;&#34;&#67;&#111;&#117;&#114;&#105;&#101;&#114;&#32;&#78;&#101;&#119;&#34;&#44;&#67;&#111;&#117;&#114;&#105;&#101;&#114;&#44;&#109;&#111;&#110;&#111;&#115;&#112;&#97;&#99;&#101;&#59;\">&#123;&#123;&#49;&#44;&#32;&#50;&#44;&#32;&#51;&#125;&#44;&#32;&#123;&#50;&#44;&#32;&#51;&#44;&#32;&#52;&#125;&#44;&#32;&#123;&#51;&#44;&#32;&#52;&#44;&#32;&#53;&#125;&#125;</pre></div>"
      ],
      "text/plain": [
       "{{1, 2, 3}, {2, 3, 4}, {3, 4, 5}}"
      ]
     },
     "execution_count": 5,
     "metadata": {
      "text/html": [],
      "text/plain": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Transpose[A]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "exceptional-princess",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><img alt=\"Output\" src=\"\"></div>"
      ],
      "text/plain": [
       "1   2   3\n",
       "\n",
       "2   3   4\n",
       "\n",
       "3   4   5"
      ]
     },
     "execution_count": 7,
     "metadata": {
      "text/html": [],
      "text/plain": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "MatrixForm[Transpose[A]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "sustained-soldier",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><pre style=\"&#102;&#111;&#110;&#116;&#45;&#102;&#97;&#109;&#105;&#108;&#121;&#58;&#32;&#34;&#67;&#111;&#117;&#114;&#105;&#101;&#114;&#32;&#78;&#101;&#119;&#34;&#44;&#67;&#111;&#117;&#114;&#105;&#101;&#114;&#44;&#109;&#111;&#110;&#111;&#115;&#112;&#97;&#99;&#101;&#59;\">&#123;&#123;&#51;&#44;&#32;&#49;&#44;&#32;&#49;&#125;&#44;&#32;&#123;&#50;&#44;&#32;&#49;&#44;&#32;&#50;&#125;&#44;&#32;&#123;&#49;&#44;&#32;&#50;&#44;&#32;&#51;&#125;&#125;</pre></div>"
      ],
      "text/plain": [
       "{{3, 1, 1}, {2, 1, 2}, {1, 2, 3}}"
      ]
     },
     "execution_count": 8,
     "metadata": {
      "text/html": [],
      "text/plain": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A={{3,1,1},{2,1,2},{1,2,3}}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "bronze-kingston",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><img alt=\"Output\" src=\"\"></div>"
      ],
      "text/plain": [
       "1      1        1\n",
       "-      -      -(-)\n",
       "4      4        4\n",
       "\n",
       "\n",
       "\n",
       "1      -2     1\n",
       "\n",
       "  3    5        1\n",
       "-(-)   -      -(-)\n",
       "  4    4        4"
      ]
     },
     "execution_count": 10,
     "metadata": {
      "text/html": [],
      "text/plain": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "MatrixForm[Inverse[A]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "excellent-deployment",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><pre style=\"&#102;&#111;&#110;&#116;&#45;&#102;&#97;&#109;&#105;&#108;&#121;&#58;&#32;&#34;&#67;&#111;&#117;&#114;&#105;&#101;&#114;&#32;&#78;&#101;&#119;&#34;&#44;&#67;&#111;&#117;&#114;&#105;&#101;&#114;&#44;&#109;&#111;&#110;&#111;&#115;&#112;&#97;&#99;&#101;&#59;\">&#123;&#123;&#49;&#44;&#32;&#50;&#44;&#32;&#51;&#125;&#44;&#32;&#123;&#49;&#44;&#32;&#45;&#49;&#44;&#32;&#45;&#50;&#125;&#44;&#32;&#123;&#45;&#49;&#44;&#32;&#49;&#44;&#32;&#49;&#125;&#125;</pre></div>"
      ],
      "text/plain": [
       "{{1, 2, 3}, {1, -1, -2}, {-1, 1, 1}}"
      ]
     },
     "execution_count": 16,
     "metadata": {
      "text/html": [],
      "text/plain": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A ={{1,2,3},{1,-1,-2},{-1,1,1}}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "under-devil",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><pre style=\"&#102;&#111;&#110;&#116;&#45;&#102;&#97;&#109;&#105;&#108;&#121;&#58;&#32;&#34;&#67;&#111;&#117;&#114;&#105;&#101;&#114;&#32;&#78;&#101;&#119;&#34;&#44;&#67;&#111;&#117;&#114;&#105;&#101;&#114;&#44;&#109;&#111;&#110;&#111;&#115;&#112;&#97;&#99;&#101;&#59;\">&#51;</pre></div>"
      ],
      "text/plain": [
       "3"
      ]
     },
     "execution_count": 17,
     "metadata": {
      "text/html": [],
      "text/plain": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Det[A]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "educational-procurement",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><img alt=\"Output\" src=\"\"></div>"
      ],
      "text/plain": [
       "   2   7\n",
       "{-(-), -, -1}\n",
       "   3   3"
      ]
     },
     "execution_count": 18,
     "metadata": {
      "text/html": [],
      "text/plain": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X = LinearSolve[A,{1,-1,2}]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "geological-gambling",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><img alt=\"Output\" src=\"\"></div>"
      ],
      "text/plain": [
       "                    2     3                            2     3\n",
       "{Root[-3 + 2 #1 - #1  + #1  & , 3], Root[-3 + 2 #1 - #1  + #1  & , 2], \n",
       " \n",
       "                       2     3\n",
       ">   Root[-3 + 2 #1 - #1  + #1  & , 1]}"
      ]
     },
     "execution_count": 19,
     "metadata": {
      "text/html": [],
      "text/plain": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Eigenvalues[A]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "photographic-norman",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><img alt=\"Output\" src=\"\"></div>"
      ],
      "text/plain": [
       "                     2     3                            2     3\n",
       "{{Root[-3 + 2 #1 - #1  + #1  & , 3], Root[-3 + 2 #1 - #1  + #1  & , 2], \n",
       " \n",
       "                        2     3\n",
       ">    Root[-3 + 2 #1 - #1  + #1  & , 1]}, \n",
       " \n",
       "                   2       3                               2       3\n",
       ">   {{Root[5 + 5 #1  + 3 #1  & , 2], Root[7 + 14 #1 + 11 #1  + 3 #1  & , 3], 1}, \n",
       " \n",
       "                   2       3                               2       3\n",
       ">    {Root[5 + 5 #1  + 3 #1  & , 3], Root[7 + 14 #1 + 11 #1  + 3 #1  & , 2], 1}, \n",
       " \n",
       "                   2       3                               2       3\n",
       ">    {Root[5 + 5 #1  + 3 #1  & , 1], Root[7 + 14 #1 + 11 #1  + 3 #1  & , 1], 1}}}"
      ]
     },
     "execution_count": 20,
     "metadata": {
      "text/html": [],
      "text/plain": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Eigensystem[A]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "abroad-representative",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><pre style=\"&#102;&#111;&#110;&#116;&#45;&#102;&#97;&#109;&#105;&#108;&#121;&#58;&#32;&#34;&#67;&#111;&#117;&#114;&#105;&#101;&#114;&#32;&#78;&#101;&#119;&#34;&#44;&#67;&#111;&#117;&#114;&#105;&#101;&#114;&#44;&#109;&#111;&#110;&#111;&#115;&#112;&#97;&#99;&#101;&#59;\">&#123;&#49;&#44;&#32;&#45;&#49;&#44;&#32;&#50;&#125;</pre></div>"
      ],
      "text/plain": [
       "{1, -1, 2}"
      ]
     },
     "execution_count": 21,
     "metadata": {
      "text/html": [],
      "text/plain": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "b = {1,-1,2}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "discrete-burton",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><img alt=\"Output\" src=\"\"></div>"
      ],
      "text/plain": [
       "  2\n",
       "-(-)\n",
       "  3\n",
       "\n",
       "7\n",
       "-\n",
       "3\n",
       "\n",
       "\n",
       "\n",
       "-1"
      ]
     },
     "execution_count": 25,
     "metadata": {
      "text/html": [],
      "text/plain": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "MatrixForm[Inverse[A].b]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "removed-vessel",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><pre style=\"&#102;&#111;&#110;&#116;&#45;&#102;&#97;&#109;&#105;&#108;&#121;&#58;&#32;&#34;&#67;&#111;&#117;&#114;&#105;&#101;&#114;&#32;&#78;&#101;&#119;&#34;&#44;&#67;&#111;&#117;&#114;&#105;&#101;&#114;&#44;&#109;&#111;&#110;&#111;&#115;&#112;&#97;&#99;&#101;&#59;\">&#45;&#51;</pre></div>"
      ],
      "text/plain": [
       "-3"
      ]
     },
     "execution_count": 26,
     "metadata": {
      "text/html": [],
      "text/plain": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Det[-A]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "outstanding-block",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><img alt=\"Output\" src=\"\"></div>"
      ],
      "text/plain": [
       "  2\n",
       "-(-)\n",
       "  3\n",
       "\n",
       "7\n",
       "-\n",
       "3\n",
       "\n",
       "\n",
       "\n",
       "-1"
      ]
     },
     "execution_count": 27,
     "metadata": {
      "text/html": [],
      "text/plain": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "MatrixForm[Inverse[-A].(-b)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "tested-testimony",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Wolfram",
   "language": "Wolfram Language",
   "name": "wolframlanguage12.2"
  },
  "language_info": {
   "codemirror_mode": "mathematica",
   "file_extension": ".m",
   "mimetype": "application/vnd.wolfram.m",
   "name": "Wolfram Language",
   "pygments_lexer": "mathematica",
   "version": "12.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
